# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-wcag-contrast-ratio
pkgver=0.9
pkgrel=3
pkgdesc="Library for computing contrast ratios, as required by WCAG 2.0"
url="https://github.com/gsnedders/wcag-contrast-ratio"
license="MIT"
arch="noarch"
depends="python3"
makedepends="py3-gpep517 py3-installer py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-hypothesis"
subpackages="$pkgname-pyc"
source="https://github.com/gsnedders/wcag-contrast-ratio/archive/$pkgver/py3-wcag-contrast-ratio-$pkgver.tar.gz"
builddir="$srcdir/wcag-contrast-ratio-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest test.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/wcag_contrast_ratio-$pkgver-py3-none-any.whl
}

sha512sums="
70ff827b092cec884ba7e969deb8b5de944844b8d5536669f2c607061fbf569c217cec93268215deb9fdebc041efd992ed0cc89e0da013f9a1be8eeeb420cec5  py3-wcag-contrast-ratio-0.9.tar.gz
"
